import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseWheelEvent;

public class USB{


    public static void main(String[]args){

        JFrame frame = new JFrame("我的窗口");
        frame.setSize(500,400);   //窗户尺寸
        frame.setLocation(0,0);      //窗口出现的位置


        frame.setLayout(new FlowLayout(FlowLayout.CENTER,20,30));

            JButton jButton = new JButton("JBUTTON");
           jButton.addMouseListener(new MouseAdapter() {
               @Override
               public void mouseClicked(MouseEvent e) {
                   super.mouseClicked(e);
               }

               @Override
               public void mousePressed(MouseEvent e) {
                   super.mousePressed(e);
               }

               @Override
               public void mouseReleased(MouseEvent e) {
                   super.mouseReleased(e);
               }

               @Override
               public void mouseEntered(MouseEvent e) {
                   super.mouseEntered(e);
               }

               @Override
               public void mouseExited(MouseEvent e) {
                   super.mouseExited(e);
               }

               @Override
               public void mouseWheelMoved(MouseWheelEvent e) {
                   super.mouseWheelMoved(e);
               }

               @Override
               public void mouseDragged(MouseEvent e) {
                   super.mouseDragged(e);
               }

               @Override
               public void mouseMoved(MouseEvent e) {
                   super.mouseMoved(e);
               }
           });
           }
        }
